//
// Created by fanghr on 17-12-24.
//

#ifndef PROJECT_CAM_DISPARITY_H
#define PROJECT_CAM_DISPARITY_H

#include "cam_singleMat.h"

class cam_disparity {
public:
    struct table_t {
        cam_singleMat data;
        int disp;

        friend class boost::serialization::accss;

        template<class Archive>
        void serialize(Archive &ar, const unsigned int) {
            ar & data & disp;
        }
    };

private:
    friend class boost::serialization::accss;

    table_t table;

    template<class Archive>
    void serialize(Archive &ar, const unsigned int) {
        ar & table;
    }

public:
    cam_disparity(cam_singleMat data, int disp) {
        table.disp = disp;
        table.data = data;
    }

    table_t get() {
        return table;
    }
};


#endif //PROJECT_CAM_DISPARITY_H
